<!--Descriptive page name, messages and instructions-->
<h2><%=h t('.works.edit.edit_work', :default =>'Edit Work') %></h2>

<%= error_messages_for :work %>
<!--/descriptions-->

<!--subnav-->
<ul class="navigation">
	<li><%= link_to t('.add_chapter', :default => 'Add Chapter'), new_work_chapter_path(@work) %></li>
  <% if @chapters %>
    <li><%= t('.edit_chapter', :default => 'Edit Chapter:') %> 
      <% for chapter in @chapters %>
        <% if chapter.posted? %>
          <%= link_to h(chapter.position), [:edit, @work, chapter] %>
        <% else %>
            <%= link_to h(chapter.position) + ts(" (Draft)"), [:edit, @work, chapter], :class => "draft-chapter"%>
	<% end %>
      <% end %></li>
    <li><%= link_to t('.manage_chapters', :default => 'Manage Chapters'), manage_work_chapters_path(@work) %></li>
  <% end %>
  <% unless (@work.pseuds - current_user.pseuds).empty? %>
    <li><%= link_to t('.remove_me_as_author', :default => 'Remove Me As Author'), { :action => "edit", :remove => "me"}, :confirm => 'This will remove you from all chapters as well. Are you sure?' %></li>
  <% end %>
	<li><%= link_to t('.orphan_work', :default => 'Orphan Work'), {:controller => 'orphans', :action => 'new', :work_id => @work.id} %></li>
	<li><%= link_to t('.delete_work', :default => 'Delete Work'), @work, :confirm => t('.links.are_you_sure', :default => 'Are you sure?'), :method => :delete %></li>
</ul>					
<!--/subnav-->

<!--main content-->					
<%= render :partial => 'standard_form' %>
<!--/content--> 

